package com.nc.solutions.rentacar.manager;

import com.nc.solutions.rentacar.domain.tariff.ITariff;
import com.nc.solutions.rentacar.domain.car.ICar;

public interface ITariffManager {

    /**
     * Getting tariff of some product by its id
     * @param id is product id
     * @return required tariff
     */
    ITariff getTariffByProductId(long id);

    /**
     * Getting tariff of some car
     * @param car is
     * @return required tariff
     */
    ITariff getTariffByProduct(ICar car);

    /**
     * Creating new tariff for specified car and returning his as method result
     * @param car is car for which we create tariff
     * @return the newly created tariff.
     */
    ITariff newTariff(ICar car);

    /**
     * Removing specified tariff
     * @param car is car which tariff need to remove
     * @return true if tariff successfully deleted, false in other case
     */
    boolean removeTariffOfCar(ICar car);
}
